package cn.wen.eeayjoke.net.presenter;

import cn.wen.eeayjoke.entity.bean.base.ResponseBean;
import cn.wen.eeayjoke.entity.bean.login.LoginBean;
import cn.wen.eeayjoke.entity.data.LoginData;
import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * 登录的业务类
 */

public class LoginPresenter extends AppPresenter {
    /**
     * 登录的接口
     */
    public void login(LoginData data, Observer<LoginBean> observer) {
        Observable<ResponseBean<LoginBean>> login = mApi.login(createRequestBody(data));
        // 转换
        convert(login, observer);
    }
}
